/*
 * @Author: thats-all-right-ha-ha 8280209+thats-all-right-ha-ha@user.noreply.gitee.com
 * @Date: 2024-02-23 19:03:19
 * @LastEditors: thats-all-right-ha-ha 8280209+thats-all-right-ha-ha@user.noreply.gitee.com
 * @LastEditTime: 2024-02-26 19:32:19
 * @FilePath: \hrManage\src\api\department.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import instance from '@/utils/request'
export const getDepartment = () => {
  return instance.get('/company/department')
}

export const getDepartmentManager = () => {
  return instance.get('/sys/user/simple')
}

export const addDepartment = (data) => {
  return instance.post('/company/department', data)
}

export const updateDepartment = (data) => {
  console.log(data)
  return instance.put(`/company/department/${data.id}`, data)
}

export const getDepartmentDetail = (id) => {
  return instance.get(`/company/department/${id}`)
}

export const delDepartment = (id) => {
  return instance.delete(`/company/department/${id}`)
}
